package com.example.service;

import com.example.entity.DataTable;
import com.example.mapper.DataTableMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DataTableService {
    @Autowired
    private DataTableMapper dataTableMapper;
    
    public List<DataTable> getAllTables() {
        return dataTableMapper.findAll();
    }
    
    public DataTable getTableByCode(String tableCode) {
        return dataTableMapper.findByCode(tableCode);
    }
}